<?php
class M_ps_pemohon extends arfaModel{
	
	function __construct() 
	{
        parent::__construct();
		$this->table_name	= "pengaduan_saran_pemohon";
		$this->primary_key	= "KD_PS_PEMOHON";
		$this->order_by		= "KD_PS_PEMOHON ASC";
    }
	
	function get_data(){
		$query = $this->db->query("
		SELECT
		pengaduan_saran_pemohon.KD_PS_PEMOHON,
		pengaduan_saran_pemohon.NAMA,
		pengaduan_saran_pemohon.NO_TELPON,
		pengaduan_saran_pemohon.EMAIL,
		pengaduan_saran_pemohon.ISI,
		pengaduan_saran_pemohon.MEDIA,
		pengaduan_saran_pemohon.KD_IJIN,
		pengaduan_saran_pemohon.NO_UPTSA,
		pengaduan_saran_pemohon.TANGGAL,
		master_ijin.ID_IJIN,
		master_ijin.NAMA_IJIN
		FROM pengaduan_saran_pemohon
		LEFT JOIN master_ijin master_ijin ON pengaduan_saran_pemohon.KD_IJIN = master_ijin.ID_IJIN
		ORDER BY pengaduan_saran_pemohon.KD_PS_PEMOHON DESC
		");
		
		return $query->result_array();
	}

}